

import java.io.*;
import java.util.*;

public class StudentList {
	// ********************************************************************
	// Try-Catch Statement is used to handle exceptions - such as file not found
	// Reading the files will need to be placed inside a Try-Catch - just like
	// this one!
	// For more information see page 534 of the textbook
	// ********************************************************************

	public void readin(String file) {
		try {
			Scanner fileScan = new Scanner(new File(file));

			// Read in the data from the file

			// Then close the file
			fileScan.close();
		}

		catch (Exception except) // Exception caught here and message displayed
									// to the screen
		{
			System.err.println(except);
			System.out.println("The Error message goes here");
		}
	}

	// -----------------------------------------------------------------
	// Check that all the classes are reachable
	// This should be removed from your final program
	// -----------------------------------------------------------------
	public void call() {
		StudentEnrol reached1 = new StudentEnrol();
		System.out.println("\nstudentEnrol reached by studentList? "
				+ reached1.studentEnrolReached());
	}

	// -----------------------------------------------------------------
	// Method for testing that class has been reached
	// This should be removed from your final program
	// -----------------------------------------------------------------
	public boolean studentListReached() {
		call();
		return true;
	}

} // end of studentList class
// -----------------------------------------------------------------
